/*******************************************************************************
 * Copyright (c) Jonathan Buck - jonbuck16@gmail.com
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    jonbuck16@gmail.com - initial API and implementation
 *******************************************************************************/
package net.jonbuck.tassoo.ui.util;

import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.widgets.Display;

public abstract class CommonFonts {

	public static Font LABEL;

	static {
		if (Display.getCurrent() != null) {
			init();
		} else {
			Display.getDefault().asyncExec(new Runnable() {
				public void run() {
					init();
				}
			});
		}
	}

	private static void init() {
		FontData labelFD = JFaceResources.getDefaultFont().getFontData()[0];
		labelFD.setStyle(SWT.BOLD);
		LABEL = new Font(Display.getDefault(), labelFD);

	}

}
